package com.okilo.online.app.lib.device.util

import android.content.Context
import com.okilo.online.app.lib.device.util.OkiloDevUtils.takeZipString
import org.json.JSONObject

/**
 * storage
 */
class OkiloDev4(val context: Context) {

    fun gOkiloDev4Data(): String? {
        return try {
            val data = JSONObject().apply {
                put("imei", "")
                put("containSd", OkiloDevUtils.gDev4Params7())
                put("ramCanUse", OkiloDevUtils.gDev4Params3(context))
                put("ramTotal", OkiloDevUtils.gDev1AndDev4Params1(context))
                put("cashCanUse", OkiloDevUtils.gDev4Params5())
                put("cashTotal", OkiloDevUtils.gDev1AndDev4Params2())
                put("extraSD", OkiloDevUtils.gDev4Params8())
                put("internalTotal", OkiloDevUtils.gDev4Params1(context))
                put("internalAvailable", OkiloDevUtils.gDev4Params2(context))
                put("ramDidUsed", OkiloDevUtils.gDev4Params4(context))
                put("cashDidUsed", OkiloDevUtils.gDev4Params6())
                put("sdCardTotal", OkiloDevUtils.gDev4Params9())
            }
            data.toString().takeZipString()

        } catch (e: Exception) {
            null
        }
    }
}